<?php

/**
 * Created by PhpStorm.
 * Author: ls
 * Time: 2024/1/4 11:32
 * Desc: 订单规格信息
 */
class Model_Member_Order_Sku extends ORM
{
    protected $_table_name = 'member_order_sku';

    /**
     * 获取订单规格信息
     * @param $order_id
     * @return false|mixed
     */
    public static function get_order_sku($order_id)
    {
        $order_sku = DB::select()
            ->from('member_order_sku')
            ->where('order_id', '=', $order_id)
            ->execute()
            ->current();
        if (empty($order_sku)) {
            return false;
        }
        return json_decode($order_sku['sku_info'], true);
    }
}